<template>
	<el-card>
		<el-form ref="ruleFormRef" label-width="auto" class="demo-ruleForm" :inline="true">
			<el-form-item label="收费员姓名" prop="id">
				<el-input placeholder="请输入" />
			</el-form-item>
			<el-form-item label="法定业主" prop="user">
				<el-date-picker type="daterange" unlink-panels range-separator="To" start-placeholder="Start date"
					end-placeholder="End date" />
			</el-form-item>
			<el-form-item prop="phone">
				<el-button type="primary" @click="$refs.table.refresh(true)">查询</el-button>
				<el-button style="margin-left: 8px" @click="resetSearchForm()">重置</el-button>
			</el-form-item>
		</el-form>
	</el-card>

	<el-card style="margin-top: 20px;">
		<el-button type="primary" style="margin-bottom: 20px;">导出excel</el-button>
		<el-button type="primary" style="margin-bottom: 20px;" @click="edit">编辑房屋</el-button>
		<el-table :data="tableData" border>
			<el-table-column prop="date" label="收费员" width="180" />
			<el-table-column prop="name" label="法定业主" width="180" />
			<el-table-column prop="address" label="房间号" />
			<el-table-column prop="address" label="手机号" />
			<el-table-column prop="address" label="积分明细" />
			<el-table-column prop="address" label="备注" />
		</el-table>
	</el-card>
	<Info ref="infoRef"></Info>
</template>

<script setup>
	import Info from './components/edit-info.vue'
	import {
		reactive,
		toRefs,
		ref
	} from "vue"
	const data = reactive({
		ruleFormRef: {
			id: '',
			user: '',
			during: '',
			phone: '',
		},
		tableData: [{}],
	})
	const {
		ruleFormRef,
		tableData,
	} = toRefs(data)
	const infoRef = ref(null)
	const edit = () => {
		infoRef.value.showModal()
	}
</script>

<style>

</style>